﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NLog;

namespace Gollie.Ajax
{
	public class AjaxResult
	{
		public int ErrorCode;
		public string ErrorMessage;
		protected static Logger logger = LogManager.GetCurrentClassLogger();

		public AjaxResult(AjaxArg arg)
		{
			ErrorCode = 0;
			ErrorMessage = "";

			if (arg != null && arg.tokenOk == false)
			{
				ErrorCode = 98;
				ErrorMessage = "Illegal method call";
			}
			else
				Init(arg);
		}

		protected virtual void Init(AjaxArg arg)
		{
		}
	}
}